package web;

import java.io.BufferedReader;
import java.io.FileReader;

import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {

	public static void main(String[] args) throws Exception {
		try {
			ServerSocket serverSocket=new ServerSocket(19999);
			Socket socket= serverSocket.accept();
			OutputStream outputStream=socket.getOutputStream();
			BufferedReader bReader= new BufferedReader(new FileReader("C:/Users/xiayaqiong/Desktop/validate.html"));
			String line=null;
			while((line=bReader.readLine())!=null){
				outputStream.write(line.getBytes());
			}
			outputStream.close();
			bReader.close();
			socket.close();
			serverSocket.close();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.exit(0);
	}
}
